﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

namespace MovieWebApp.Controls
{
    public partial class Language : System.Web.UI.UserControl
    {
        string PageName;
        protected void Page_Load(object sender, EventArgs e)
        {
            string sPath = System.Web.HttpContext.Current.Request.Url.AbsolutePath;
            System.IO.FileInfo oInfo = new System.IO.FileInfo(sPath);
            PageName = oInfo.Name;
        }

        protected void EnglishFlag_Click(object sender, ImageClickEventArgs e)
        {
            Session["Language"] = "en";
            Response.Redirect(PageName);
        }

       
        protected void SpanishFlag_Click(object sender, ImageClickEventArgs e)
        {

        }

        protected void ddlCurrency_SelectedIndexChanged(object sender, EventArgs e)
        {

        }

        protected void BrazilFlag_Click(object sender, ImageClickEventArgs e)
        {
            Session["Language"] = "pt";
            Response.Redirect(PageName);

        }

        protected void UkraineFlag_Click(object sender, ImageClickEventArgs e)
        {
            Session["Language"] = "uk";
            Response.Redirect(PageName);
        }
    }
}